Checks if file is changed first