File creation working but ... broken