Fixed some warnings.
Added clean up code to remove test file.