Added handling for files, if file does not exist. Added pdf library to view pdf before download.