created a method to check for file existence

currently, this has only been added to the 'serve' task.