Fixed issue with overwriting files.