Updted the file handling logic and enabled oauth callback.