Index: uspace/lib/ext4/libext4_directory.c
===================================================================
--- uspace/lib/ext4/libext4_directory.c	(revision fe56c08a69113bf5489b1354873b01a1b999b551)
+++ uspace/lib/ext4/libext4_directory.c	(revision ca3d77a43415e42e7e7f78021189e98802aad60a)
@@ -263,6 +263,4 @@
 		const char *entry_name, ext4_inode_ref_t *child)
 {
-	EXT4FS_DBG("adding dentry \%s to child inode \%u to directory \%u", entry_name, child->index, inode_ref->index);
-
 	int rc;
 
@@ -281,6 +279,4 @@
 		uint32_t entry_inode = ext4_directory_entry_ll_get_inode(it.current);
 		uint16_t rec_len = ext4_directory_entry_ll_get_entry_length(it.current);
-
-		EXT4FS_DBG("inode = \%u, rec_len == \%u, required_len = \%u", entry_inode, rec_len, required_len);
 
 		if ((entry_inode == 0) && (rec_len >= required_len)) {
@@ -377,4 +373,7 @@
 	}
 
+	// Fill block with zeroes
+	memset(new_block->data, 0, block_size);
+
 	ext4_directory_entry_ll_t *block_entry = new_block->data;
 
Index: uspace/lib/ext4/libext4_filesystem.c
===================================================================
--- uspace/lib/ext4/libext4_filesystem.c	(revision fe56c08a69113bf5489b1354873b01a1b999b551)
+++ uspace/lib/ext4/libext4_filesystem.c	(revision ca3d77a43415e42e7e7f78021189e98802aad60a)
@@ -284,4 +284,5 @@
 
 	// TODO extents, dir_index etc...
+
 	rc = ext4_filesystem_get_inode_ref(fs, index, inode_ref);
 	if (rc != EOK) {
@@ -325,5 +326,5 @@
 	int rc;
 
-	// release all indirect blocks
+	// release all indirect (no data) blocks
 
 	// 1) Single indirect
@@ -332,5 +333,5 @@
 		rc = ext4_balloc_free_block(fs, inode_ref, fblock);
 		if (rc != EOK) {
-			// TODO error
+			return rc;
 		}
 
@@ -443,4 +444,6 @@
 		ext4_inode_ref_t *inode_ref, aoff64_t new_size)
 {
+	int rc;
+
 	if (! ext4_inode_can_truncate(fs->superblock, inode_ref->inode)) {
 		// Unable to truncate
@@ -454,8 +457,6 @@
 	}
 
+	// It's not suppported to make the larger file
 	if (old_size < new_size) {
-		// Currently not supported to expand the file
-		// TODO
-		EXT4FS_DBG("trying to expand the file");
 		return EINVAL;
 	}
@@ -463,18 +464,20 @@
 	aoff64_t size_diff = old_size - new_size;
 	uint32_t block_size  = ext4_superblock_get_block_size(fs->superblock);
-	uint32_t blocks_count = size_diff / block_size;
+	uint32_t diff_blocks_count = size_diff / block_size;
 	if (size_diff % block_size != 0) {
-		blocks_count++;
-	}
-
-	uint32_t total_blocks = old_size / block_size;
+		diff_blocks_count++;
+	}
+
+	uint32_t old_blocks_count = old_size / block_size;
 	if (old_size % block_size != 0) {
-		total_blocks++;
+		old_blocks_count++;
 	}
 
 	// starting from 1 because of logical blocks are numbered from 0
-	for (uint32_t i = 1; i <= blocks_count; ++i) {
-		// TODO check retval
-		ext4_filesystem_release_inode_block(fs, inode_ref, total_blocks - i);
+	for (uint32_t i = 1; i <= diff_blocks_count; ++i) {
+		rc = ext4_filesystem_release_inode_block(fs, inode_ref, old_blocks_count - i);
+		if (rc != EOK) {
+			return rc;
+		}
 	}
 
Index: uspace/srv/fs/ext4fs/ext4fs_ops.c
===================================================================
--- uspace/srv/fs/ext4fs/ext4fs_ops.c	(revision fe56c08a69113bf5489b1354873b01a1b999b551)
+++ uspace/srv/fs/ext4fs/ext4fs_ops.c	(revision ca3d77a43415e42e7e7f78021189e98802aad60a)
@@ -373,5 +373,4 @@
 int ext4fs_create_node(fs_node_t **rfn, service_id_t service_id, int flags)
 {
-	EXT4FS_DBG("");
 	int rc;
 
@@ -405,6 +404,4 @@
 	}
 
-	EXT4FS_DBG("allocated");
-
 	enode->inode_ref = inode_ref;
 	enode->instance = inst;
@@ -430,7 +427,4 @@
 	*rfn = fs_node;
 
-	EXT4FS_DBG("finished");
-
-	// TODO
 	return EOK;
 }
@@ -439,5 +433,4 @@
 int ext4fs_destroy_node(fs_node_t *fn)
 {
-	EXT4FS_DBG("");
 	int rc;
 
@@ -450,5 +443,4 @@
 
 	if (has_children) {
-		EXT4FS_DBG("destroying non-empty node");
 		ext4fs_node_put(fn);
 		return EINVAL;
@@ -489,6 +481,4 @@
 int ext4fs_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
 {
-	EXT4FS_DBG("");
-
 	int rc;
 
@@ -497,7 +487,4 @@
 		return ENAMETOOLONG;
 	}
-
-	EXT4FS_DBG("name checked");
-
 	ext4fs_node_t *parent = EXT4FS_NODE(pfn);
 	ext4fs_node_t *child = EXT4FS_NODE(cfn);
@@ -509,6 +496,4 @@
 		return rc;
 	}
-
-	EXT4FS_DBG("dentry added");
 
 	// Fill new dir -> add '.' and '..' entries
@@ -520,6 +505,4 @@
 			return rc;
 		}
-
-		EXT4FS_DBG("added dot");
 
 		rc = ext4_directory_add_entry(fs, child->inode_ref, "..", parent->inode_ref);
@@ -530,6 +513,4 @@
 		}
 
-		EXT4FS_DBG("added dotdot");
-
 		uint16_t parent_links = ext4_inode_get_links_count(parent->inode_ref->inode);
 		parent_links++;
@@ -552,6 +533,4 @@
 int ext4fs_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *name)
 {
-//	EXT4FS_DBG("unlinking \%s", name);
-
 	int rc;
 
@@ -559,5 +538,4 @@
 	rc = ext4fs_has_children(&has_children, cfn);
 	if (rc != EOK) {
-		EXT4FS_DBG("\%s error: \%u", name, rc);
 		return rc;
 	}
@@ -573,5 +551,4 @@
 	rc = ext4_directory_remove_entry(fs, parent, name);
 	if (rc != EOK) {
-		EXT4FS_DBG("\%s removing entry failed: \%u", name, rc);
 		return rc;
 	}
@@ -1086,5 +1063,4 @@
 	rc = ext4fs_node_get(&fn, service_id, index);
 	if (rc != EOK) {
-		EXT4FS_DBG("node get error");
 		return rc;
 	}
@@ -1096,5 +1072,4 @@
 		ext4fs_node_put(fn);
 		async_answer_0(callid, rc);
-		EXT4FS_DBG("data write recv");
 		return rc;
 	}
@@ -1136,5 +1111,8 @@
 		rc = ext4_filesystem_set_inode_data_block_index(fs, inode_ref, iblock, fblock);
 		if (rc != EOK) {
-			EXT4FS_DBG("ERROR: setting index failed");
+			ext4_balloc_free_block(fs, inode_ref, fblock);
+			ext4fs_node_put(fn);
+			async_answer_0(callid, rc);
+			return rc;
 		}
 		inode_ref->dirty = true;
