Changed the if statement.
Removed the file from utils and implemented a testing with temporary files which are created in the systems tmp folder and gets removed after the test.