Fixing file path in put_file method