Fixed file handling