file handling tweak