Tweaked file handling