Using os.path to split filename and place extension
Removing print debug