Move errors to seperate file