Add checks for file's source