Last frame as a parameter
Basic error handling