This is probably safer to have here as well before returning

file.close()