Don't create empty files

Now makes sure that if the code is empty, then a file isn't made