corrected bugs and missing functionality in the file management