attemps 1
fix
file handling like a boss