Fix the bug with files storing
Cleans the SQL-script