Added Error Handling to all php pages