Fixed exiting the program, and prevents non PDF file from being dragged in.