Fixed fileops
Updated tests