remove empty file and update function.view to check for json_last_error function