check for uploading files before navigating away