fix error type in FileManager