No longer creates files in the wrong directory.