fixed writting to file

Pretty simple to fix, just wrong indentation.