Clean up logic for adding prefix to file name