improved logging if you're using php54 or later