legit file handling